package io.qar.task;

import com.alibaba.fastjson.JSONObject;
import io.qar.feign.BackCalculateFeignClient;
import io.qar.feign.ScheduleJobFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * admin服务定时调度执行回算业务
 */
@Component("BackCalculateTask")
public class BackCalculateTask implements ITask {

    @Autowired
    private BackCalculateFeignClient backCalculateFeignClient;
    @Override
    public void run(String params) {
        Map<String, Object> map = JSONObject.parseObject(params, Map.class);
        backCalculateFeignClient.execute(map);
    }
}
